<?php
class Posts_Model extends General_Model {
	function getList() {
		$query = $this->db->get ( 'posts' );
		$list = $query->result ();
		return $list;
	}
	function getDetail($id) {
		$this->db->where ( 'id', $id );
		$query = $this->db->get ( 'posts' );
		$detail = $query->row ();
		return $detail;
	}
	
	function del($id) {
		$this->db->where ( 'id', $id );
		$this->db->limit ( 1, 0 );
		$this->db->delete ( 'posts' );
		return TRUE;
	}
}